<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.ico?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.ico?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.ico?v=5.1.4">


  <link rel="mask-icon" href="/images/facicon.ico?v=5.1.4" color="#222">





  <meta name="keywords" content="Linux,Node.js,">





  <link rel="alternate" href="/atom.xml" title="Key" type="application/atom+xml">






<meta name="description" content="在linux下安装Nodejs有以下几种方式。我使用的是CentOS 7版本，其实linux下安装nodejs都大同小异。直接部署和通过nvm进行部署。 直接部署安装wegt（如果你有源码包，跳过该步骤） CentOS  1sudo yum install wget  ubuntu  1sudo apt-get install wget  当然如果你已经安装了，跳过该步  下载适合你系统的Node">
<meta name="keywords" content="Linux,Node.js">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux Node.js安装方式">
<meta property="og:url" content="https://blog.qipo.net/2018/06/22/node/index.html">
<meta property="og:site_name" content="Key">
<meta property="og:description" content="在linux下安装Nodejs有以下几种方式。我使用的是CentOS 7版本，其实linux下安装nodejs都大同小异。直接部署和通过nvm进行部署。 直接部署安装wegt（如果你有源码包，跳过该步骤） CentOS  1sudo yum install wget  ubuntu  1sudo apt-get install wget  当然如果你已经安装了，跳过该步  下载适合你系统的Node">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2020-06-03T02:37:45.278Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Linux Node.js安装方式">
<meta name="twitter:description" content="在linux下安装Nodejs有以下几种方式。我使用的是CentOS 7版本，其实linux下安装nodejs都大同小异。直接部署和通过nvm进行部署。 直接部署安装wegt（如果你有源码包，跳过该步骤） CentOS  1sudo yum install wget  ubuntu  1sudo apt-get install wget  当然如果你已经安装了，跳过该步  下载适合你系统的Node">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://blog.qipo.net/2018/06/22/node/">





  <title>Linux Node.js安装方式 | Key</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Key</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <h1 class="site-subtitle" itemprop="description"></h1>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://blog.qipo.net/2018/06/22/node/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Key">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Key">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">Linux Node.js安装方式</h2>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-06-22T17:16:54+08:00">
                2018-06-22
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Node-js/" itemprop="url" rel="index">
                    <span itemprop="name">Node.js</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  875
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  3
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>在linux下安装Nodejs有以下几种方式。我使用的是CentOS 7版本，其实linux下安装nodejs都大同小异。直接部署和通过nvm进行部署。</p>
<h1 id="直接部署"><a href="#直接部署" class="headerlink" title="直接部署"></a>直接部署</h1><h2 id="安装wegt（如果你有源码包，跳过该步骤）"><a href="#安装wegt（如果你有源码包，跳过该步骤）" class="headerlink" title="安装wegt（如果你有源码包，跳过该步骤）"></a>安装wegt（如果你有源码包，跳过该步骤）</h2><blockquote>
<p>CentOS</p>
</blockquote>
<figure class="highlight cmake"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo yum <span class="keyword">install</span> wget</span><br></pre></td></tr></table></figure>
<blockquote>
<p>ubuntu</p>
</blockquote>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-<span class="builtin-name">get</span> install wget</span><br></pre></td></tr></table></figure>
<blockquote>
<p>当然如果你已经安装了，跳过该步</p>
</blockquote>
<h2 id="下载适合你系统的Nodejs的源码包（如果你有源码包，跳过该步骤）"><a href="#下载适合你系统的Nodejs的源码包（如果你有源码包，跳过该步骤）" class="headerlink" title="下载适合你系统的Nodejs的源码包（如果你有源码包，跳过该步骤）"></a>下载适合你系统的Nodejs的源码包（如果你有源码包，跳过该步骤）</h2><p>可以在Nodejs官网的下载页面<a href="https://nodejs.org/en/download/" target="_blank" rel="noopener">https://nodejs.org/en/download/</a>中找到下载地址。然后执行指令</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wget https://nodejs.org/dist/v8.<span class="number">11.3</span>/<span class="keyword">node</span><span class="title">-v8</span>.<span class="number">11.3</span>-linux-x64.tar.xz</span><br></pre></td></tr></table></figure>
<p>然后就是等着下载完毕。<br>另外你也可以在你喜欢的任意系统上下载最新的bin包，然后通过FTP上传到Linux上。</p>
<h2 id="解压包"><a href="#解压包" class="headerlink" title="解压包"></a>解压包</h2><p>依次执行</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">xz -d <span class="keyword">node</span><span class="title">-v8</span>.<span class="number">11.3</span>-linux-x64.tar.xz</span><br><span class="line"></span><br><span class="line">tar -xf <span class="keyword">node</span><span class="title">-v8</span>.<span class="number">11.3</span>-linux-x64.tar</span><br></pre></td></tr></table></figure>
<h2 id="部署源码文件"><a href="#部署源码文件" class="headerlink" title="部署源码文件"></a>部署源码文件</h2><p>先确认你nodejs的路径，我这里的路径为<code>~/node-v8.11.3-linux-x64/bin</code>。确认后依次执行</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ln -s ~/<span class="keyword">node</span><span class="title">-v9</span>.<span class="number">3.0</span>-linux-x64/bin/<span class="keyword">node</span> <span class="title">/usr</span>/bin/<span class="keyword">node</span><span class="title"></span></span><br><span class="line"><span class="title">ln</span> -s ~/<span class="keyword">node</span><span class="title">-v9</span>.<span class="number">3.0</span>-linux-x64/bin/npm /usr/bin/npm</span><br></pre></td></tr></table></figure>
<p>注意ln指令用于创建关联（类似与Windows的快捷方式）必须给全路径，否则可能关联错误。</p>
<h2 id="测试"><a href="#测试" class="headerlink" title="测试"></a>测试</h2><p>依次执行</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">node</span> <span class="title">-v</span></span><br><span class="line">npm -v</span><br></pre></td></tr></table></figure>
<p>如果正确输出版本号，则部署OK.</p>
<blockquote>
<p>这种安装的方法好处是比较干净，安装也比较快速。个人认为比较适合新手。</p>
</blockquote>
<h2 id="问题解决"><a href="#问题解决" class="headerlink" title="问题解决"></a>问题解决</h2><blockquote>
<p>但是如果遇到nodejs插件全局安装时，即使安装成功，也不能调用相应命令，需要把npm全局安装模块所在的位置加到环境变量中，才能调用全局安装模块相应的命令。</p>
</blockquote>
<p>操作如下</p>
<figure class="highlight gradle"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//执行以下命令，进入环境变量设置</span></span><br><span class="line">[root@localhost ~]# vim <span class="regexp">/etc/</span>profile</span><br><span class="line"></span><br><span class="line"><span class="comment">//在打开的文档中最后面加入，为nodejs/bin所在文件夹的绝对路径</span></span><br><span class="line">PATH=$PATH:<span class="regexp">/root/</span>node-v8.<span class="number">11.3</span>-linux-x64<span class="regexp">/bin/</span></span><br><span class="line">export PATH</span><br><span class="line"></span><br><span class="line"><span class="comment">//输入以下使环境变量生效</span></span><br><span class="line"><span class="keyword">source</span> <span class="regexp">/ect/</span>profile</span><br></pre></td></tr></table></figure>
<h1 id="间接方式下载"><a href="#间接方式下载" class="headerlink" title="间接方式下载"></a>间接方式下载</h1><p>Nodejs有一个版本管理工具<code>NVM</code>，这种方式是先下载<code>NVM</code>，然后通过<code>NVM</code>直接下载有史以来各种版本的<code>Nodejs</code>。</p>
<h2 id="安装wget"><a href="#安装wget" class="headerlink" title="安装wget"></a>安装wget</h2><p>如上所述</p>
<h2 id="安装NVM"><a href="#安装NVM" class="headerlink" title="安装NVM"></a>安装NVM</h2><p>具体的你可以看一下<code>NVM</code>的github源码库<a href="https://github.com/creationix/nvm" target="_blank" rel="noopener">https://github.com/creationix/nvm</a>,文档中有详细的安装步骤。</p>
<p>这里就不多废话，直接就是安装。执行下面的命令。</p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">wget -qO- https:<span class="regexp">//</span>raw.githubusercontent.com<span class="regexp">/creationix/</span>nvm<span class="regexp">/v0.33.11/i</span>nstall.sh | bash</span><br></pre></td></tr></table></figure>
<p>执行完就算安装上了。</p>
<p>测试是否安装成功,执行下面的命令，有版本号输出即为成功。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-attr">[root@localhost ~]</span># <span class="selector-tag">nvm</span> <span class="selector-tag">--version</span></span><br><span class="line">0<span class="selector-class">.33</span><span class="selector-class">.11</span></span><br></pre></td></tr></table></figure>
<h2 id="NVM切换源地址"><a href="#NVM切换源地址" class="headerlink" title="NVM切换源地址"></a>NVM切换源地址</h2><p>更换下载源(默认是从 <a href="http://nodejs.org/dist/" target="_blank" rel="noopener">http://nodejs.org/dist/</a> 下载的, 国外服务器, 必然很慢)：</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">NVM_NODEJS_ORG_MIRROR=</span>https://npm.taobao.org/mirrors/<span class="keyword">node</span><span class="title"></span></span><br></pre></td></tr></table></figure>
<h2 id="安装Nodejs"><a href="#安装Nodejs" class="headerlink" title="安装Nodejs"></a>安装Nodejs</h2><p>列出远程客户端Nodejs的所有版本,大概有几百行,最好是下载安装<code>LTS</code>版本，即长期支持版。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-attr">[root@localhost ~]</span># <span class="selector-tag">nvm</span> <span class="selector-tag">ls-remote</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.14</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.15</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.16</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.17</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.18</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.19</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.20</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.21</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.22</span></span><br><span class="line">        <span class="selector-tag">v0</span><span class="selector-class">.1</span><span class="selector-class">.23</span></span><br></pre></td></tr></table></figure>
<p>安装吧，输入下面的命令，一键安装吧！</p>
<figure class="highlight autoit"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">[root<span class="symbol">@localhost</span> ~]<span class="meta"># nvm install v8.11.3  #安装指定版本的nodejs</span></span><br><span class="line"></span><br><span class="line">[root<span class="symbol">@localhost</span> ~]<span class="meta"># nvm install stable  #安装最新稳定版 node</span></span><br></pre></td></tr></table></figure>
<h2 id="测试-1"><a href="#测试-1" class="headerlink" title="测试"></a>测试</h2><p>依次执行</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">node</span> <span class="title">-v</span></span><br><span class="line">npm -v</span><br></pre></td></tr></table></figure>
<p>如果正确输出版本号，则部署OK.</p>
<blockquote>
<p>这种安装的方法好处是更加简单，没有后患。可能下载速度会很慢。</p>
</blockquote>

      
    </div>
    
    
    

    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div></div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.jpg" alt="Key 微信支付">
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.jpg" alt="Key 支付宝">
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Linux/" rel="tag"># Linux</a>
          
            <a href="/tags/Node-js/" rel="tag"># Node.js</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/03/08/java/" rel="next" title="Java 抽象类的定义以及使用">
                <i class="fa fa-chevron-left"></i> Java 抽象类的定义以及使用
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/06/26/npm/" rel="prev" title="NPM 国内慢的问题解决">
                NPM 国内慢的问题解决 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/avatar.jpg" alt="Key">
            
              <p class="site-author-name" itemprop="name">Key</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">107</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">12</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">28</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/keyarea" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:wxkayle@gmail.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#直接部署"><span class="nav-number">1.</span> <span class="nav-text">直接部署</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#安装wegt（如果你有源码包，跳过该步骤）"><span class="nav-number">1.1.</span> <span class="nav-text">安装wegt（如果你有源码包，跳过该步骤）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#下载适合你系统的Nodejs的源码包（如果你有源码包，跳过该步骤）"><span class="nav-number">1.2.</span> <span class="nav-text">下载适合你系统的Nodejs的源码包（如果你有源码包，跳过该步骤）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#解压包"><span class="nav-number">1.3.</span> <span class="nav-text">解压包</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#部署源码文件"><span class="nav-number">1.4.</span> <span class="nav-text">部署源码文件</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#测试"><span class="nav-number">1.5.</span> <span class="nav-text">测试</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#问题解决"><span class="nav-number">1.6.</span> <span class="nav-text">问题解决</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#间接方式下载"><span class="nav-number">2.</span> <span class="nav-text">间接方式下载</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#安装wget"><span class="nav-number">2.1.</span> <span class="nav-text">安装wget</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装NVM"><span class="nav-number">2.2.</span> <span class="nav-text">安装NVM</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#NVM切换源地址"><span class="nav-number">2.3.</span> <span class="nav-text">NVM切换源地址</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装Nodejs"><span class="nav-number">2.4.</span> <span class="nav-text">安装Nodejs</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#测试-1"><span class="nav-number">2.5.</span> <span class="nav-text">测试</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 &mdash; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-snowflake-o"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Key</span>

  
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    
      <span class="post-meta-item-text">Site words total count&#58;</span>
    
    <span title="Site words total count">190.8k</span>
  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
